home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Internet / News / Alexandra.0.82 / Source / HeadInspector.subproj / ArticleHeaderController.m < prev    next >
Encoding:
Text File  |  1996-01-30  |  863 b   |  44 lines

  1.  
  2. #import "ArticleHeaderController.h"
  3. #import "../Alexandra.h"
  4. #import "../MainWindowControl.h"
  5. #import "../ArticleViewControl.h"
  6.  
  7. @implementation ArticleHeaderController
  8.  
  9. - init
  10. {
  11.     [super init];
  12.     if([NXApp loadNibSection:"ArticleInspector.nib" owner:self withNames:NO]==nil)
  13.         EM_ERROR(EGENFileNotFound,"ArticleInspector.nib",NULL);
  14.  
  15.     return self;
  16. }
  17.  
  18. - windowDidUpdate:sender
  19. {
  20.     id newWindow=[NXApp mainWindow];
  21.     id newArticle=nil;
  22.     id aDelegate=nil;
  23.     
  24.     if(newWindow && (aDelegate=[newWindow delegate],aDelegate))
  25.         if([aDelegate isKindOf:[MainWindowControl class]])
  26.             newArticle=[[aDelegate articleSet] currentSelection];
  27.     
  28.     if(newArticle!=currentArticle)
  29.         if(newArticle)
  30.             [theText setText:[[aDelegate articleViewControll] articleHeader]];
  31.         else
  32.             [theText setText:""];
  33.             
  34.     currentArticle=newArticle;        
  35.     return self;
  36. }
  37.  
  38. - window
  39. {
  40.     return window;
  41. }
  42.  
  43. @end
  44.